<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace BLL\Common;

/**
 * Description of CodeGeneratorHelper
 *
 * @author David Wu
 */
class CodeGeneratorHelper {
    //put your code here
    
    public static function generatr($strArr, $stepIn = 1){
        $output = "";
        foreach($strArr as $str){
            if(starts_with($str, "}"))$stepIn--;
            $output .= str_repeat(" ", $stepIn * 4) . $str ."\r\n";
            if(ends_with($str, "{"))$stepIn++;
        }
        return $output;
    }
}
